<?php


namespace app\webs\controller;


use app\common\controller\Api;
use app\webs\model\EssayModel;

class Essay extends Api
{
    public function index()
    {
        $id = input('id/d');
        if (empty($id)){
            $this->error('请输入文章ID');
        }
        $index = EssayModel::find($id);
        if (!$index){
            $this->error('未查询到');
        }
        $this->success('查询成功',$index);
    }

}